package com.bbcare.exportExcel.plat.entity;	

import java.util.List;
import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.OneToMany;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.GenericGenerator;

/**
 * @name:问卷	
 * @author:	
 * @createTime: 
 */	
	
@Entity	
@Table(name="t_questionnaire")	
public class Questionnaire {	
	
	@Id	
	@GenericGenerator(name="systemUUID",strategy="uuid")	
	@GeneratedValue(generator="systemUUID")	
	@Column(name="_id")
	private String id;
	
	//问卷名	
	@Column(name="_name")
	private String name;	
	
	//适用最大年龄	
	@Column(name="_ageMax")
	private Integer ageMax;	
	
	//适用最小年龄	
	@Column(name="_ageMin")
	private Integer ageMin;	
	
	//总分	
	@Column(name="_totalScore")
	private Integer totalScore;	
	
	//问卷说明	
	@Column(name="_note")
	private String note;	
	
	//是否锁定	
	@Column(name="_isLock")
	private Boolean isLock;	
	
	//创建时间	
	@Column(name="_createTime")
	private Date createTime;	
	
	//包含问题
	@OneToMany(mappedBy="questionnaire")
    private List<Question> questions;
	
	//所属问卷包
	@ManyToOne
    @JoinColumn(name="_questionnairePackage_id")
    private QuestionnairePackage questionnairePackage;
    
    //关联问卷包名称
	@Column(name="_questionnairePackage_name")
    private String questionnairePackageName;
	
	//是否启用
	@Column(name="_isUsed")
	private Integer isUsed;
	
	//是否为建档问卷
	@Column(name="_isBuildArchives")
	private Boolean isBuildArchives;
	
	
	public String getId() {	
		return id;	
	}	
	
	public void setId(String id) {	
		this.id = id;	
	}
	
	public String getName() {	
		return name;	
	}	
	
	public void setName(String name) {	
		this.name = name;	
	}
	
	public Integer getAgeMax() {	
		return ageMax;	
	}	
	
	public void setAgeMax(Integer ageMax) {	
		this.ageMax = ageMax;	
	}
	
	public Integer getAgeMin() {	
		return ageMin;	
	}	
	
	public void setAgeMin(Integer ageMin) {	
		this.ageMin = ageMin;	
	}
	
	public Integer getTotalScore() {	
		return totalScore;	
	}	
	
	public void setTotalScore(Integer totalScore) {	
		this.totalScore = totalScore;	
	}
	
	public String getNote() {	
		return note;	
	}	
	
	public void setNote(String note) {	
		this.note = note;	
	}
	
	public Boolean getIsLock() {	
		return isLock;	
	}	
	
	public void setIsLock(Boolean isLock) {	
		this.isLock = isLock;	
	}

	public Date getCreateTime() {	
		return createTime;	
	}	
	
	public void setCreateTime(Date createTime) {	
		this.createTime = createTime;	
	}
	
	public List<Question> getQuestions() {	
		return questions;	
	}
	
	public void setQuestions(List<Question> questions) {	
		this.questions = questions;	
	}
	
	public QuestionnairePackage getQuestionnairePackage() {	
		return questionnairePackage;	
	}
	
	public void setQuestionnairePackage(QuestionnairePackage questionnairePackage) {	
		this.questionnairePackage = questionnairePackage;	
	}
	
	public String getQuestionnairePackageName() {	
		return questionnairePackageName;	
	}
	
	public void setQuestionnairePackageName(String questionnairePackageName) {	
		this.questionnairePackageName = questionnairePackageName;	
	}
	
	public Integer getIsUsed() {
		return isUsed;
	}

	public void setIsUsed(Integer isUsed) {
		this.isUsed = isUsed;
	}

	public Boolean getIsBuildArchives() {
		return isBuildArchives;
	}

	public void setIsBuildArchives(Boolean isBuildArchives) {
		this.isBuildArchives = isBuildArchives;
	}

}